From: Magnus Manske Date: Thu, 7 Jul 2005 18:45:22 +0000 (+0000) Subject: Fixes for patch X-Git-Tag: 1.5.0beta4~205 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=ecfe0e38feaae4e60f159fd6097c3484c8597372;p=lhc%2Fweb%2Fwiklou.git Fixes for patch --- diff --git a/includes/SpecialValidate.php b/includes/SpecialValidate.php index 5766a318db..1c43c98c56 100644 --- a/includes/SpecialValidate.php +++ b/includes/SpecialValidate.php @@ -555,7 +555,7 @@ class Validation { # Collecting statistic data $db =& wfGetDB( DB_SLAVE ); - $res = $db->select( 'validate', '*', array( 'val_page' => $this->page_id, val_revision => $revision ), 'SpecialValidate::showDetails' ); + $res = $db->select( 'validate', '*', array( 'val_page' => $this->page_id, 'val_revision' => $revision ), 'SpecialValidate::showDetails' ); while( $x = $db->fetchObject($res) ) { $data[$this->make_user_id($x)][$x->val_type] = $x; $users[$this->make_user_id($x)] = true; @@ -623,11 +623,14 @@ class Validation { # Collecting statistic data $db =& wfGetDB( DB_SLAVE ); - $res = $db->select( 'validate', '*', array( val_page => $this->page_id ), 'SpecialValidate::showList' ); + $res = $db->select( 'validate', '*', array( "val_page" => $this->page_id ), 'SpecialValidate::showList' ); $statistics = array(); while( $vote = $db->fetchObject($res) ) { $ts = $this->getRevisionTimestamp($vote->val_revision); + if ( !isset ( $statistics[$ts] ) ) $statistics[$ts] = array () ; + if ( !isset ( $statistics[$ts][$vote->val_type]->count ) ) $statistics[$ts][$vote->val_type]->count = 0 ; + if ( !isset ( $statistics[$ts][$vote->val_type]->sum ) ) $statistics[$ts][$vote->val_type]->sum = 0 ; $statistics[$ts][$vote->val_type]->count++; $statistics[$ts][$vote->val_type]->sum += $vote->val_value; } diff --git a/languages/Language.php b/languages/Language.php index ff9d724f26..c520bdecea 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1505,7 +1505,7 @@ Type the name of the user in the box and press the button to make the user an ad 'val_validation_of' => 'Validation of "$1"', 'val_revision_of' => 'Revision of $1', 'val_revision_changes_ok' => 'Your ratings have been stored!', -'val_rev_stats_link' => 'See the validation statistics for "$1" here', +'val_rev_stats' => 'See the validation statistics for "$1" here', 'val_revision_stats_link' => 'details', 'val_iamsure' => 'Check this box if you really mean it!', 'val_details_th' => 'User \\ Topic',